ArcPad Scripting Object Model
ScaleRectangle Example
Send Feedback
ArcPad Scripting Object Model Reference > ArcPad Scripting Samples > ScaleRectangle Example

Glossary Item Box

Description

Zooms in on the map by 50%

VBScript Code

Copy Code
Sub ZoomIn
  Dim objRect
  'Get the current map extent
  Set objRect = Application.Map.Extent
  'Scale the extent by 50%
  Call objRect.ScaleRectangle(0.5)
  'Set the new map extent
  Application.Map.Extent = objRect
  Set objRect = Nothing
End Sub

 

JScript Code

Copy Code
function ZoomIn()
{
  // Get the current map extent
  var objRect = Application.Map.Extent;
  // Scale the extent by 50%
  objRect.ScaleRectangle(0.5);
  // Set the new map extent
  Application.Map.Extent = objRect;
  objRect = null;
}

 

©2012. All Rights Reserved.